package com.project.mapper;

import com.project.entity.Accessory;
import com.project.entity.Logs;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * ClassName: ProTeacherDtoMapper
 * Package: com.project.mapper
 * Description:
 *
 * @Author 看到风
 * @Create 2023/11/5 21:41
 * @Version 1.0
 */
@Mapper
public interface ProTeacherDtoMapper {
    //负责人
    public String getMyMaster(Long projectId);

    //成员
    public List<String> getMyMember(Long projectId);

    //立项日志
    public Logs getMyLogBegin(Long projectId);

    //立项附件
    @Select("select * from accessory where project_id =#{projectId} and type =0")
    public List<Accessory> getMyAccessoryBegin(Long projectId);

    //中期日志
    public Logs getMyLogMid(Long projectId);
    //中期附件
    @Select("select * from accessory where project_id =#{projectId} and type =1")
    public List<Accessory> getMyAccessoryMid(Long projectId);
    //结项日志
    public Logs getMyLogEnd(Long projectId);
    //结项附件
    @Select("select * from accessory where project_id =#{projectId} and type =2")
    public List<Accessory> getMyAccessoryEnd(Long projectId);

    //延期日志
    public Logs getMyLogExtension(Long projectId);
    //延期附件
    @Select("select * from accessory where project_id =#{projectId} and type =3")
    public List<Accessory> getMyAccessoryExtension(Long projectId);

}
